<div class="context">
      <form method="get" action="<?php echo $this->Html->url(array('controller'=> 'default','action'=>'search')); ?>" name="frmSearch" id="frmSearch" class="frmSearch">
        <span class="searchBox">
        <input type="text" value="Tìm kiếm" id="txtSearch" name="q" />
        <a href="javascript:void();" id="quick-search-submit" title="Search">&nbsp;</a> </span> <a href="javascript:void();" title="Tìm kiếm nâng cao" class="linkSearch">Tìm kiếm nâng cao</a>
        <input type="hidden" value="001897934961332779774:ysd417-tqpk" name="cx" />
        <input type="hidden" value="FORID:10" name="cof">
        <input type="hidden" value="UTF-8" name="ie">
      </form>
  <!--frmSearch-->
  <div class="titlePage">
    <h2>
      <?php echo $this->Html->image('dummy.gif', array('alt'=> 'Giải trí', 'class'=>'uiIcon24 initIcon24-5')); ?>
      <span>Giải trí</span>
    </h2>
    <?php
        
        if(isset($list_cat_game[0])): ?>
        <ul>
            <?php
            $thefirst   =   true;
            foreach($list_cat_game AS $cat_row): ?>
            <?php
                if($thefirst){
                    $class  =   ' class="first"';
                }
                else{
                    $class  =   '';
                }
                $thefirst   =   false;
            ?>
            <li<?php echo $class; ?>><a title="<?php echo $cat_row['Catgame']['title']; ?>" href="<?php echo $this->Html->url(array('controller'=>'giai-tri', 'action'=>'danh-muc',"{$cat_row['Catgame']['id']}-{$cat_row['Catgame']['alias']}")); ?>">
            <?php echo $this->Html->image('dummy.gif', array('alt'=> $cat_row['Catgame']['title'], 'class'=>'uiIcon initIcon-6')); ?>
            <span><?php echo $cat_row['Catgame']['title']; ?></span></a></li>
            <?php endforeach; ?>
       </ul>
    <?php endif; ?>
  </div>
  <!--titlePage-->
  <?php if(isset($list_special_content[0])): ?>
  <ul class="lstItemsNews">
    <?php foreach($list_special_content AS $s_row): ?>
      <li>
        <dl>
          <dt> <?php echo $this->Html->image($special_content_thumb_url_path . $s_row['SpecialContent']['thumbnail'], array('width'=>'82', 'height'=>'106', 'alt'=>$s_row['SpecialContent']['title'])); ?></dt>
          <dd class="title"><?php echo $s_row['SpecialContent']['title']; ?></dd>
          <dd class="detail"><?php echo $s_row['SpecialContent']['short_content']; ?></dd>
          <dd class="readMore"><?php echo $this->Html->link('Xem chi tiết', array('controller'=> "{$s_row['SpecialContent']['id']}-{$s_row['SpecialContent']['alias']}",'ext'=>'html')); ?></dd>
        </dl>
      </li>
    <?php endforeach; ?>
  </ul>
  <!--end lstItemsNews-->
  <?php endif; ?>
</div>
<!--end context-->
<div class="content content-2">
 <?php if(isset($top_games[0])): ?>
  <h3>GAME CHƠI NHIỀU NHẤT</h3>
  <div class="slideShow slideType02">
    <div class="wrapSlide"> <a href="javascript:void(0);" title="Pre" class="prev"><span class="uiIcon24 initIcon24-1 png">&nbsp;</span></a>
      <div class="innerSlide" id="list_topgame_giaitri">
        <ul class="blockItemGame">
          <?php foreach($top_games AS $game): ?>
             <li> <a href="<?php echo $this->Html->url(array('controller'=>'giai-tri', 'action'=>'chi-tiet', "{$game['Game']['id']}-{$game['Game']['alias']}")); ?>" title="<?php echo $game['Game']['title']; ?>"> <?php echo $this->Html->image($game_image_thumb_url_path . $game['Game']['thumbnail'], array('width'=>'102', 'height'=>'72', 'alt'=> $game['Game']['title'])); ?> <span><?php echo $game['Game']['title']; ?></span> <span class="count">Số lần chơi: <?php echo $game['Game']['play_times']; ?></span> </a> </li>
          <?php endforeach; ?>
        </ul>
        <!--blockItemGame-->
      </div>
      <!--innerSlide-->
      <a href="javascript:void(0);" title="Next" class="next"><span class="uiIcon24 initIcon24-2 png">&nbsp;</span></a> </div>
    <!--wrapSlide-->
  </div>
  <?php endif; ?>
  <!--slideShow-->
  <h3>GAME MỚI NHẤT CÓ TRONG THỂ LOẠI "<?php echo $cat_info['Catgame']['title'] ?>"</h3>
  <div class="wrapListGame">
    <div class="listGame">
    <?php
        $row_index  =   0;
        $total_product  =   sizeof($data);

        foreach($data AS $row):
        if($row_index == 0){
            echo '<ul class="blockItemGame">';
        }
    ?>

        <li> <a href="<?php echo $this->Html->url(array('controller'=>'giai-tri', 'action'=>'chi-tiet', "{$row['Game']['id']}-{$row['Game']['alias']}")); ?>" title="<?php echo $row['Game']['title']; ?>">
        <?php echo $this->Html->image($game_image_thumb_url_path . $row['Game']['thumbnail'], array('alt'=>$row['Game']['title'],'width'=>'102', 'height'=>'72')); ?>
        <span><?php echo $row['Game']['title']; ?></span> <span class="count">Số lần chơi: <?php echo $row['Game']['play_times']; ?></span> </a>
        </li>

      <?php
        $row_index++;
        if($row_index== 5 || $row_index == ($total_product)){
            $row_index=0;
            echo '</ul>';
        }
        endforeach;
      ?>
    <!--end lstProduct-->
    </div>
    <!--ListGame-->
    <?php echo $this->element('paging', array('paging'=>$this->Paginator));?>
    <!--paging-->
  </div>
  <!--wrapListGame-->
</div>
<!--end content-->
